package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 题目
 */
@Data
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 题目内容
     */
    private String name;

    /**
     * 题干内容
     */
    private String content;

    /**
     * 题库id
     */
    private Integer questionBankId;

    /**
     * 题目类型
     */
    private Integer questionType;

    /**
     * 题干类型
     */
    private Integer stemType;

    /**
     * 题目难度
     */
    private Integer difficulty;
    /**
     * 材料
     */
    private String material;
    /**
     * 判断答案
     */
    private Boolean judgmentAnswer;
    /**
     * 问答答案
     */
    private String questionAnswer;
    /**
     * 答案解析
     */
    private String answerKey;
    /**
     * 材料题目id
     */
    private Integer materialQuestionId;
    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();

    /**
     * 题目选项
     */
    private List<Option> options;
    /**
     * 材料题目
     */
    private List<Question> questions;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    /**
     * 材料题目排序
     */
    private Integer sort;
    /**
     * 是否删除
     */
    private Boolean deleted;

    private String category;
    private String tkCategoryId;
    private Integer type;
    /**
     * 每题分数
     */
    private Double grade;

    /**
     * 题目名称
     */
    private String questionBankName;

    /**
     * 是否已经选择 （0未选择，1已选）
     */
    private Integer ifSelect = 0;

}